$(document).ready(function() {
	wHtml();
	$("#cImgDBI").click(function() {
		document.getElementById('fade').style.display = 'block';
		document.getElementById('bgI').style.display = "block";
		var iSrc = this.src;
		document.getElementById("bgID").src = iSrc;
	});
	$("#dImgDBI").click(function() {
		document.getElementById('fade').style.display = 'block';
		document.getElementById('bgI').style.display = "block";
		var iSrc = this.src;
		document.getElementById("bgID").src = iSrc;
	});
	$("#bgID").click(function() {
		document.getElementById('fade').style.display = 'none';
		document.getElementById('bgI').style.display = "none";
	});
});
function wHtml(){
    var hContent = "<ul class='iLB' id='iLBU' style='margin-left:0px;'>";
	for(var i=1;i<3;i++){
		hContent += "<li>"+"<img src=\""+contextPath+"/resources/img/xfaq"+i+".jpg\" width='45' height='40' onmouseover='viewPic(this)'/>"+"</li>";
	}
	hContent += "</ul>";
	document.getElementById("cImgDL2"). innerHTML = hContent;
	
	var hContent1 = "<ul class='iLB' id='iLBU1' style='margin-left:0px;'>";
	for(var i=1;i<3;i++){
		hContent1 += "<li>"+"<img src=\""+contextPath+"/resources/img/ftfx"+i+".jpg\" width='45' height='40' onmouseover='viewPic1(this)'/>"+"</li>";
	}
	hContent1 += "</ul>";
	document.getElementById("dImgDL2"). innerHTML = hContent1;
}
function viewPic(_this){
	document.getElementById("cImgDBI").src = _this.src;
}
function viewPic1(_this){
	document.getElementById("dImgDBI").src = _this.src;
}
function setLM(){
	var mLeft = document.getElementById("iLBU").style.marginLeft;
	var lLeft = mLeft.split("p")[0];
	if(lLeft<0){
		document.getElementById("iLBU").style.marginLeft = parseInt(lLeft)+40+ "px";
	}
}
function setLM1(){
	var mLeft1 = document.getElementById("iLBU1").style.marginLeft;
	var lLeft1 = mLeft1.split("p")[0];
	if(lLeft1<0){
		document.getElementById("iLBU1").style.marginLeft = parseInt(lLeft1)+40+ "px";
	}
}
function setRM(){
	var mLeft = document.getElementById("iLBU").style.marginLeft;
	var lLeft = mLeft.split("p")[0];
	if(lLeft>-470){
		document.getElementById("iLBU").style.marginLeft = parseInt(lLeft)-40+ "px";
	}
}
function setRM1(){
	var mLeft1 = document.getElementById("iLBU1").style.marginLeft;
	var lLeft1 = mLeft1.split("p")[0];
	if(lLeft1>-470){
		document.getElementById("iLBU1").style.marginLeft = parseInt(lLeft1)-40+ "px";
	}
}
function selectZDGC(){
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("zdgc").style.display="block";
	}
	pName="zdgc";
}
function selectXFAQ(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("xfaq").style.display="block";
	}
	pName="xfaq";
}
function selectFTFX(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("ftfx").style.display="block";
	}
	pName="ftfx";
}
function selectRYDL(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	pName="rydl";
}function selectRYDL(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("rydl").style.display="block";
	}
	pName="rydl";
}
function selectRYSS(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("ryss").style.display="block";
	}
	pName="ryss";
}
function selectRYRQ(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("ryrq").style.display="block";
	}
	pName="ryrq";
}
function selectSGBL(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	if(pName=="byfx"){
		document.getElementById("byfx").style.display="none";
		document.getElementById("sgbl").style.display="block";
	}
	pName="sgbl";
}
function selectBYFX(){
	if(pName=="zdgc"){
		document.getElementById("zdgc").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="xfaq"){
		document.getElementById("xfaq").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="ftfx"){
		document.getElementById("ftfx").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="rydl"){
		document.getElementById("rydl").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="ryss"){
		document.getElementById("ryss").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="ryrq"){
		document.getElementById("ryrq").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	if(pName=="sgbl"){
		document.getElementById("sgbl").style.display="none";
		document.getElementById("byfx").style.display="block";
	}
	pName="byfx";
}